﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace game
{
    public static class SimpleMovement
    {
        public static float Rotate(float curRot, float rotSpeed)
        {
            curRot += rotSpeed * MovementControl.DeltaTimeMs;
            while (curRot > MathHelper.Pi)
                curRot -= MathHelper.TwoPi;
            while (curRot <= -MathHelper.Pi)
                curRot += MathHelper.TwoPi;
            return curRot;
        }

        public static Vector3 MoveForward(Vector3 curPos, float speed, Vector3 dir)
        {
            curPos += dir * speed * MovementControl.DeltaTimeMs;
            return curPos;
        }
    }
}
